<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>{:session('cp.cpsysname')}--服务商管理平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{:config('webconfig.description');}">
    <meta name="keywords" content="{:config('webconfig.keywords');}">
    <meta name="author" content="runoob">
    <link rel="stylesheet" href="__STATIC_URL__/static/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/index.css" />
    <link rel="stylesheet" href="__STATIC_URL__/static/css/addmchat.css" />
    <link rel="stylesheet" href="__STATIC_URL__/static/css/bootstrapSwitch.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/member/css/core1.css?v=8" />
    <link rel="stylesheet" type="text/css" href="/momachbid.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/setmachbank.css" />

    <script src="__STATIC_URL__/static/jquery/2.2.1/jquery.min.js"></script>
    <script src="__STATIC_URL__/static/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="__STATIC_URL__/static/js/bootstrapSwitch.js"></script>
    <script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC_URL__/static/layer/layer.js"></script>
    <script src="__STATIC_URL__/static/js/distpicker/distpicker.data.js?v=3"></script>
    <script src="__STATIC_URL__/static/js/distpicker/distpicker.js"></script>
    <script src="__STATIC_URL__/static/laydate/laydate.js"></script>
    <script src="/static/machtobank.js"></script>
    <script src="/whangye.js"></script>
</head>
<style>
    .uploadImg p label .fdj {
        background: url(__STATIC_URL__/static/img/eye.png) center center no-repeat;
    }

    .uploadImg p label .delSingle {
        background: url(__STATIC_URL__/static/img/delete.png) center center no-repeat;
    }

    .setup {
        display: none;
    }
</style>

<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section id="content">
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading">
            <ul class="breadcrumb mgl15 mgr15">
                <li>当前位置是:</li>
                <li>
                    <a href="javascript:history.back();">商户管理</a>
                </li>
                <li>
                    银行通道进件
                </li>
            </ul>
        </div>

        <div class="panel panel-default mgl15 mgr15">
            <div class="panel-heading addCharts" style="background:#ededed;">进件银行通道配置</div>
            <div class="panel-body">
                <form class="form-horizontal adminex-form" action="" method="post" id="mach" name="form" enctype="multipart/form-data">
                    <ul id="myTab" class="nav nav-tabs">
                        <li class="active" role="presentation" id="jichus">
                            <a href="#jichu" data-toggle="tab">进件资料</a>
                        </li>
                        <!--<li class="" role="presentation" id="contactss"><a href="#contacts" data-toggle="tab">法人、法人信息</a></li>-->
                        <!--<li class="" role="presentation" id="banks"><a href="#bank" data-toggle="tab">银行账户信息</a></li>-->
                        <!--<li class="" role="presentation" id="wxalis"><a href="#wxali" data-toggle="tab">微信、支付宝支付信息</a></li>-->
                        <!--<li class="" role="presentation" id="uploads"><a href="#upload" data-toggle="tab">上传证件照</a></li>-->
                        <!--<li class="" role="presentation" id="activitys"><a href="#activity" data-toggle="tab">餐饮特惠活动</a></li>-->
                    </ul>
                    <div id="myTabContent" class="tab-content" style="padding-top:15px;">

                        <div class="tab-pane in active" id="jichu">
                            <div class="setup setup1" style="display: block">
                                <div class="bgctitle ">
                                    <span></span>商户基本信息
                                </div>
                                <div class="addinput">

                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户类型：</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" id="merchType" name="merchType" onchange="merchc('merchType');">
                                                <option value="">请选择</option>
                                                <option value="1">商户连锁</option>
                                                <option value="2">单店</option>
                                            </select>
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>
                                        </div>
                                    </div>

                                    <div class="form-group merchType1" id="" style="display:none;">
                                        <label class="col-sm-2 col-sm-2 control-label">关联商户号：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="relatedMerchName" name="relatedMerchName">
                                            <div id="" class="error"></div>
                                            <div class="titlecont">1.填写连锁商户的住商户商户号。2.非连锁商户不填写</div>

                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户注册名称：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="merchName" name="merchName">
                                            <div id="" class="error"></div>
                                            <div class="titlecont">1.填写营业执照上面的商户名称。2.个体商户填写商户简称</div>

                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户简称：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="merchShortName" name="merchShortName">
                                            <div id="" class="error"></div>
                                            <div class="titlecont">简称格式：地区+商户名称+行业</div>

                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>管理员账号：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="tellerId" name="tellerId">

                                            <div id="" class="error"></div>
                                            <div class="titlecont">建议使用手机号或法人姓名拼音+生日，避免重复</div>

                                        </div>
                                    </div>

                                </div>
                                <div class="panel-footer" style="text-align:center;margin-top:50px;">
                                    <button type="button" onclick="setup(2)" class="btn btn-primary">下一步</button>

                                </div>
                            </div>
                            <div class="setup setup2">
                                <div class="bgctitle ">
                                    <span></span>商户详细信息
                                </div>
                                <div class="addinput">
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户性质：</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" id="merchClass" name="merchClass" onchange="merchc('merchClass');">
                                                <option value="">请选择</option>
                                                <option value="1">企业商户</option>
                                                <option value="2">个体商户</option>

                                            </select>
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>
                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户种类：</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" style="" id="pnrpayMerType" name="pnrpayMerType">
                                                <option value="">请选择</option>
                                                <option value="1">政府机构</option>
                                                <option value="2">国营企业</option>
                                                <option value="3">私营企业</option>
                                                <option value="4">外资企业</option>
                                                <option value="5">个体工商户</option>
                                                <option value="7">事业单位</option>
                                            </select>
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>

                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户注册地：</label>
                                        <div class="col-sm-10">
                                            <div class="input-group" id="distpicker1">
                                                <select class="form-control" id="regProvId" name="regProvId">

                                                </select>
                                                <select class="form-control" name="regCityId" id="regCityId">

                                                </select>
                                                <select class="form-control" name="regAreaId" id="regAreaId">

                                                </select>
                                                <div id="error13" class="error"></div>
                                            </div>
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>

                                        </div>
                                    </div>

                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户注册详细地址：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="regAddr" name="regAddr">
                                            <div id="" class="error"></div>
                                            <div class="titlecont">填写商户实际的注册详细地址</div>

                                        </div>
                                    </div>

                                    <div class="form-group merchClass1" style="display:none;">
                                        <label class="col-sm-2 col-sm-2 control-label">是否三证合一：</label>
                                        <div class="col-sm-10">
                                            <input type="hidden"  name="isCreditCode" value="1" class="isCreditCode">
                                            <div class="switch switch-small" data-animated="true" id="isCreditCode" data-on-label="是" data-off-label="否">
                                                <input type="checkbox" checked/>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group merchClass1 isCreditCode1" id="" style="display:none;">
                                        <label class="col-sm-2 col-sm-2 control-label">统一社会信用代码证：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="creditCode" name="creditCode">
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>

                                        </div>
                                    </div>
                                    <div class="form-group  isCreditCode2" id="" style="display:none;">
                                        <label class="col-sm-2 col-sm-2 control-label">营业执照编号：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="regCode" name="regCode">
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>

                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>证照有效期：</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" style="" id="licType" name="licType" onchange="merchc('licType');">
                                                <option value="">请选择</option>
                                                <option value="1">非长期</option>
                                                <option value="2">长期</option>
                                            </select>
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>
                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label">证照开始日期：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="licSdate" name="licSdate">
                                            <div id="" class="error"></div>
                                            <div class="titlecont">日期格式要求：20180115</div>

                                        </div>
                                    </div>
                                    <div class="form-group licType1" style="display:none;">
                                        <label class="col-sm-2 col-sm-2 control-label">证照结束日期：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="licEdate" name="licEdate">
                                            <div id="" class="error"></div>
                                            <div class="titlecont">日期格式要求：20180115</div>

                                        </div>
                                    </div>
                                    <div class="form-group isCreditCode2" style="display:none">
                                        <label class="col-sm-2 col-sm-2 control-label">组织机构代码证：</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="orgCode" name="orgCode">
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>

                                        </div>
                                    </div>
                                    <div class="form-group" id="">
                                        <label class="col-sm-2 col-sm-2 control-label"><span
                                                class="glyphicon glyphicon-asterisk glyphicon-tip"></span>商户经营类型：</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" style="" id="cateType" name="cateType">
                                                <option value="">请选择</option>
                                                <option value="1">实体</option>
                                                <option value="2">虚拟</option>
                                            </select>
                                            <div id="" class="error"></div>
                                            <div class="titlecont"></div>
                                        </div>
                                    </div>

                                </div>
                                <div class="panel-footer" style="text-align:center;margin-top:50px;">
                                    <button type="button" onclick="setup(1)" class="btn btn-primary">上一步</button>
                                    <button type="button" onclick="setup(3)" class="btn btn-primary">下一步</button>
                                </div>
                            </div>
                            <div class="setup setup3">
                                <div class="bgctitle ">
                                    <span></span>法人信息
                                </div>

                                <div class="form-group " id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人姓名：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="contactName" name="contactName">

                                        <div id="" class="error"></div>
                                        <div class="titlecont">商户法人姓名.支持少数名族，最大支持15个汉字</div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件类型：</label>
                                    <div class="col-sm-10">
                                        <select class="form-control" style="" id="contactIdType" name="contactIdType">
                                            <option value="">请选择</option>
                                            <option value="01">身份证</option>
                                            <option value="02">护照</option>
                                            <option value="04">军官证</option>
                                            <option value="03">港澳台通行证</option>
                                            <option value="05">回乡证</option>
                                            <option value="06">工商登记号</option>
                                            <option value="09">其他</option>
                                        </select>
                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件号码：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="contactIdNo" name="contactIdNo">
                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件有效期：</label>
                                    <div class="col-sm-10">
                                        <select class="form-control" id="contactIdValidType" name="contactIdValidType" onchange="merchc('contactIdValidType');">
                                            <option value="">请选择</option>
                                            <option value="1">非长期</option>
                                            <option value="2">长期</option>

                                        </select>
                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人证件有效期开始日期：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="contactIdSdate" name="contactIdSdate">

                                        <div id="" class="error"></div>
                                        <div class="titlecont">日期格式要求：20180115</div>

                                    </div>
                                </div>
                                <div class="form-group contactIdValidType1" id="" style="display:none;">
                                    <label class="col-sm-2 col-sm-2 control-label">商户法人证件有效期结束日期：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="contactIdEdate" name="contactIdEdate">

                                        <div id="" class="error"></div>
                                        <div class="titlecont">日期格式要求：20180115</div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人手机号：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="contactTelno" name="contactTelno">

                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>是否发短信通知商户：</label>
                                    <div class="col-sm-10">
                                        <input type="hidden" name="isSendMes" value="1" class="isSendMes">
                                        <div class="switch switch-small" data-animated="true" id="isSendMes" data-on-label="是" data-off-label="否">
                                            <input type="checkbox"  checked/>

                                        </div>
                                        <div class="titlecont">发送短信通知商户法人，包含控台地址、管理员账号、密码</div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>法人邮箱：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="contactEmail" name="contactEmail">

                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                    <div class="panel-footer" style="text-align:center;margin-top:50px;">
                                        <button type="button" onclick="setup(2)" class="btn btn-primary">上一步</button>
                                        <button type="button" onclick="setup(4)" class="btn btn-primary">下一步</button>
                                    </div>
                                </div>
                            </div>
                            <div class="setup setup4">
                                <div class="bgctitle ">
                                    <span></span>银行账户信息
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算账户类型：</label>
                                    <div class="col-sm-10">
                                        <select class="form-control" id="isPrivate" name="isPrivate" onchange="Private('isPrivate');">
                                            <option value="">请选择</option>
                                            <option value="0">对公</option>
                                            <option value="1">对私</option>

                                        </select>
                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算账户名：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="bankActName" name="bankActName">

                                        <div id="" class="error"></div>
                                        <div class="titlecont">结算账户名称，对公结算时，结算账户名称需与商户注册名称一致</div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算账号：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="bankActId" name="bankActId">

                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>银行所在地：</label>
                                    <div class="col-sm-10">
                                        <div class="input-group" id="distpicker3">
                                            <select class="form-control" id="bankProvId" name="bankProvId">

                                            </select>
                                            <select class="form-control" name="bankCityId" id="bankCityId">

                                            </select>
                                            <select class="form-control" name="bankAreaId" id="bankAreaId">

                                            </select>
                                            <div id="" class="error"></div>
                                        </div>
                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>银行名称：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="bankName" name="bankName">

                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label"><span
                                            class="glyphicon glyphicon-asterisk glyphicon-tip"></span>结算周期：</label>
                                    <div class="col-sm-10">
                                        <select class="form-control" id="settleTerm" name="settleTerm" onchange="merchc('settleTerm');">
                                            <option value="1">T+1</option>
                                            <option value="2">D+1</option>

                                        </select>
                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <div class="form-group settleTerm2" style="display:none">
                                    <label class="col-sm-2 col-sm-2 control-label">D+1结算手续费（%）：</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="fee01" name="fee01">

                                        <div id="" class="error"></div>
                                        <div class="titlecont"></div>

                                    </div>
                                </div>
                                <!--<div class="isPrivate2" style="display:none">-->
                                <!--<div class="form-group" id="">-->
                                <!--<label class="col-sm-2 col-sm-2 control-label">持卡人证件类型：</label>-->
                                <!--<div class="col-sm-10">-->
                                <!--<select class="form-control" style="" id="accountIdType" name="accountIdType" >-->
                                <!--<option value="">请选择</option>-->
                                <!--<option value="01">身份证</option>-->
                                <!--<option value="02">护照</option>-->
                                <!--<option value="04">军官证</option>-->
                                <!--<option value="03">港澳台通行证</option>-->
                                <!--<option value="05">回乡证</option>-->
                                <!--<option value="06">工商登记号</option>-->
                                <!--<option value="09">其他</option>-->
                                <!--</select>-->
                                <!--<div id="" class="error"></div>-->
                                <!--<div class="titlecont"></div>-->

                                <!--</div>-->
                                <!--</div>-->
                                <!--<div class="form-group" id="">-->
                                <!--<label class="col-sm-2 col-sm-2 control-label">持卡人证件号码：</label>-->
                                <!--<div class="col-sm-10">-->
                                <!--<input type="text" class="form-control" id="accountIdNo" name="accountIdNo" >-->
                                <!--<div id="" class="error"></div>-->
                                <!--<div class="titlecont"></div>-->

                                <!--</div>-->
                                <!--</div>-->
                                <!--<div class="form-group" id="">-->
                                <!--<label class="col-sm-2 col-sm-2 control-label">持卡人证件有效期：</label>-->
                                <!--<div class="col-sm-10">-->
                                <!--<select class="form-control" style="" id="accountIdValidType" name="accountIdValidType" onchange ="merchc('accountIdValidType');">-->
                                <!--<option value="1">非长期</option>-->
                                <!--<option value="2">长期</option>-->

                                <!--</select>-->
                                <!--<div id="" class="error"></div>-->
                                <!--<div class="titlecont"></div>-->

                                <!--</div>-->
                                <!--</div>-->
                                <!--<div class="form-group" id="">-->
                                <!--<label class="col-sm-2 col-sm-2 control-label">持卡人证件有效期开始日期：</label>-->
                                <!--<div class="col-sm-10">-->
                                <!--<input type="text" class="form-control" id="accountIdSdate" name="accountIdSdate">-->

                                <!--<div id="" class="error"></div>-->
                                <!--<div class="titlecont">日期格式要求：20180115</div>-->

                                <!--</div>-->
                                <!--</div>-->
                                <!--<div class="form-group accountIdValidType1" id="">-->
                                <!--<label class="col-sm-2 col-sm-2 control-label">持卡人证件有效期结束日期：</label>-->
                                <!--<div class="col-sm-10">-->
                                <!--<input type="text" class="form-control" id="accountIdEdate" name="accountIdEdate">-->

                                <!--<div id="" class="error"></div>-->
                                <!--<div class="titlecont">日期格式要求：20180115</div>-->

                                <!--</div>-->
                                <!--</div>-->
                                <div class="panel-footer" style="text-align:center;margin-top:50px;">
                                    <button type="button" onclick="setup(3)" class="btn btn-primary">上一步</button>
                                    <button type="button" onclick="setup(5)" class="btn btn-primary">下一步</button>
                                </div>

                            </div>
                            <div class="setup setup5">
                                <div class="form-group" id="">
                                    <div class="addinput tab-pane " id="wxali">
                                        <div class="bgctitle ">
                                            <span></span>微信、支付宝支付信息
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 col-sm-2 control-label"><span
                                                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>是否开通微信支付：</label>
                                            <div class="col-sm-10">
                                                <input type="hidden" name="auth18" value="1" class="auth18">
                                                <div class="switch switch-small" data-animated="true" id="auth18" data-on-label="是" data-off-label="否">
                                                    <input type="checkbox"  checked/>

                                                </div>
                                                <div class="titlecont"></div>

                                            </div>
                                        </div>

                                        <div class="form-group auth181" id="">
                                            <label class="col-sm-2 col-sm-2 control-label">商户经营类目：</label>
                                            <div class="col-sm-10">
                                                <div class="input-group" id="selectItem">
                                                    <input type="hidden" class="form-control" id="wechatCateCode" name="wechatCateCode">
                                                    <select class="form-control province" id="primary" name="leibie">

                                                    </select>
                                                    <select class="form-control city" name="leibie2" id="secondary">

                                                    </select>
                                                    <select class="form-control county" name="leibie3" id="Third" onchange="wechat(this);">

                                                    </select>
                                                </div>

                                                <div id="" class="error"></div>
                                                <div class="titlecont">开通微信支付业务时必填。</div>

                                            </div>
                                        </div>
                                        <div class="form-group auth181" id="">
                                            <label class="col-sm-2 col-sm-2 control-label">微信支付手续费（%）：</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="fee08" name="fee08">

                                                <div id="" class="error"></div>
                                                <div class="titlecont">开通微信支付业务时必填。手续费保留小数点后4位。如：0.5533</div>

                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 col-sm-2 control-label"><span
                                                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>是否开通支付宝支付：</label>
                                            <div class="col-sm-10">
                                                <input type="hidden" name="auth19" value="1" class="auth19">
                                                <div class="switch switch-small" data-animated="true" id="auth19" data-on-label="是" data-off-label="否">
                                                    <input type="checkbox"  checked/>

                                                </div>
                                                <div class="titlecont"></div>

                                            </div>
                                        </div>

                                        <div class="form-group auth191" id="">
                                            <label class="col-sm-2 col-sm-2 control-label">商户经营类目（支付宝）：</label>
                                            <div class="col-sm-10">
                                                <select class="form-control" style="" id="alipayCateCode" name="alipayCateCode">
                                                    <option value="">请选择</option>
                                                    <option value="2015050700000000">美食</option>
                                                    <option value="2015091000052157">超市便利店</option>
                                                    <option value="2015062600004525">休闲娱乐</option>
                                                    <option value="2015062600002758">购物</option>
                                                    <option value="2016062900190124">爱车</option>
                                                    <option value="2015063000020189">生活服务</option>
                                                    <option value="2016042200000148">教育培训</option>
                                                    <option value="2016062900190296">医疗健康</option>
                                                    <option value="2015080600000001">航旅</option>
                                                    <option value="2016062900190337">专业销售/批发</option>
                                                    <option value="2016062900190371">政府/社会组织</option>

                                                </select>
                                                <div id="" class="error"></div>
                                                <div class="titlecont">开通支付宝支付业务时必填。</div>

                                            </div>
                                        </div>
                                        <div class="form-group auth191" id="">
                                            <label class="col-sm-2 col-sm-2 control-label">支付宝支付手续费（%）：</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="fee12" name="fee12">

                                                <div id="" class="error"></div>
                                                <div class="titlecont">开通支付宝支付业务时必填。手续费保留小数点后4位。如：0.5533</div>

                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 col-sm-2 control-label"><span
                                                    class="glyphicon glyphicon-asterisk glyphicon-tip"></span>是否开通微信小程序支付：</label>
                                            <div class="col-sm-10">
                                                <input type="hidden"  name="auth38" value="1" class="auth38">
                                                <div class="switch switch-small" data-animated="true" id="auth38" data-on-label="是" data-off-label="否">
                                                    <input type="checkbox" checked/>

                                                </div>
                                                <div class="titlecont"></div>

                                            </div>
                                        </div>
                                        <div class="form-group auth381" id="">
                                            <label class="col-sm-2 col-sm-2 control-label">微信小程序AppID：</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="wxAppid" name="wxAppid">

                                                <div id="" class="error"></div>
                                                <div class="titlecont">开通微信小程序支付手续费业务时必填。</div>

                                            </div>
                                        </div>
                                        <div class="form-group auth381" id="">
                                            <label class="col-sm-2 col-sm-2 control-label">微信小程序支付手续费（%）：</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="fee33" name="fee33">

                                                <div id="" class="error"></div>
                                                <div class="titlecont">开通微信小程序支付手续费业务时必填。手续费保留小数点后4位。如：0.5533</div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="panel-footer" style="text-align:center;margin-top:50px;">
                                    <button type="button" onclick="setup(4)" class="btn btn-primary">上一步</button>
                                    <button type="button" onclick="setup(6)" class="btn btn-primary">下一步</button>
                                </div>

                            </div>
                            <div class="setup setup6">
                                <div class="bgctitle ">
                                    <span></span>上传证件照
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label">营业执照：</label>
                                    <div class="col-sm-10 upimglist fl mwth380">
                                        <div class="uploadImg fl">
													<span class="fileBox">
                                            <input class="addImg upload" type="file" id="file0" name="file"
                                                   onchange="upload(this,'archFlph01','file0img')">
                                        </span>
                                            <input type="hidden" class="form-control inputimg" id="archFlph01" name="archFlph01">

                                            <img src="__STATIC_URL__/static/img/500kb.jpg" class="showImg file0img">
                                            <p class="showImg hide">
                                                <label class="opearte">
                                                    <a href="javascript:" class="fdj">
                                                    </a>
                                                    <a href="javascript:" class="delSingle">
                                                    </a>
                                                </label>
                                            </p>
                                            <div class="imgtitle">
                                                营业执照
                                            </div>
                                        </div>

                                        <div id="" class="error"></div>
                                        <div class="titlecont">企业商户必填，格式：数字+数字，如1_1,表示第一个商户的营业执照照片，与zip包中的图片名称对应。
                                        </div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label">开户许可证：</label>
                                    <div class="col-sm-10 upimglist fl mwth380">
                                        <div class="uploadImg fl">
													<span class="fileBox">
                                            <input class="addImg upload" type="file" id="file1" name="file"
                                                   onchange="upload(this,'archFlph04','file1img')">
                                        </span>
                                            <input type="hidden" class="form-control inputimg" id="archFlph04" name="archFlph04">

                                            <img src="__STATIC_URL__/static/img/500kb.jpg" class="showImg file1img">
                                            <p class="showImg hide">
                                                <label class="opearte">
                                                    <a href="javascript:" class="fdj">
                                                    </a>
                                                    <a href="javascript:" class="delSingle">
                                                    </a>
                                                </label>
                                            </p>
                                            <div class="imgtitle">
                                                开户许可证
                                            </div>
                                        </div>

                                        <div id="" class="error"></div>
                                        <div class="titlecont">企业商户必填，格式：数字+数字，如1_1,表示第一个商户的开户许可证照片，与zip包中的图片名称对应。
                                        </div>

                                    </div>
                                </div>
                                <div class="form-group" id="">
                                    <label class="col-sm-2 col-sm-2 control-label">法人身份证：</label>
                                    <div class="col-sm-5 upimglist fl mwth380">
                                        <div class="uploadImg fl">
													<span class="fileBox">
                                            <input class="addImg upload" type="file" id="file3" name="file"
                                                   onchange="upload(this,'archFlph05','file2img')">
                                        </span>
                                            <input type="hidden" class="form-control inputimg" id="archFlph05" name="archFlph05">

                                            <img src="__STATIC_URL__/static/img/500kb.jpg" class="showImg file2img">
                                            <p class="showImg hide">
                                                <label class="opearte">
                                                    <a href="javascript:" class="fdj">
                                                    </a>
                                                    <a href="javascript:" class="delSingle">
                                                    </a>
                                                </label>
                                            </p>
                                            <div class="imgtitle">
                                                法人身份证正面
                                            </div>

                                        </div>
                                        <div class="uploadImg fl">
													<span class="fileBox">
                                            <input class="addImg upload" type="file" id="file4" name="file"
                                                   onchange="upload(this,'archFlph06','file3img')">
                                        </span>
                                            <input type="hidden" class="form-control inputimg" id="archFlph06" name="archFlph06">

                                            <img src="__STATIC_URL__/static/img/500kb.jpg" class="showImg file3img">
                                            <p class="showImg hide">
                                                <label class="opearte">
                                                    <a href="javascript:" class="fdj">
                                                    </a>
                                                    <a href="javascript:" class="delSingle">
                                                    </a>
                                                </label>
                                            </p>
                                            <div class="imgtitle">
                                                法人身份证反面
                                            </div>

                                        </div>

                                        <div id="" class="error"></div>
                                        <div class="titlecont">
                                            企业商户必填，格式：数字+数字，如1_1,表示第一个商户的法人身份证正反面照片，与zip包中的图片名称对应。
                                        </div>

                                    </div>

                                </div>
                                <div class="panel-footer" style="text-align:center;margin-top:50px;">
                                    <button type="button" onclick="setup(5)" class="btn btn-primary">上一步</button>
                                    <button type="button" onclick="addform()" class="btn btn-primary">提交审核</button>

                                </div>

                            </div>

                        </div>
                    </div>

                </form>
            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <div class="modal-body">
                <img src="" alt="" id="img">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>
<script src="/static/cos-js-sdk-v5.js?v=" +Math.random()></script>
</body>
<script>
    var Bucket = 'payos-1251056009';
    var Region = 'ap-shanghai';
    var cos = new COS({
        getAuthorization: function(options, callback) {
            // 异步获取签名
            $.get('{:url()}', {
                bucket: options.Bucket,
                region: options.Region,
            }, function(data) {
                // console.log(data);

                callback({
                    TmpSecretId: data.credentials.tmpSecretId,
                    TmpSecretKey: data.credentials.tmpSecretKey,
                    XCosSecurityToken: data.XCosSecurityToken,
                    ExpiredTime: data.expiredTime,
                });
            });
        }
    });

    // 监听选文件
    function upload(obj, fid, img) {
        var data = Date.parse(new Date());
        var file = obj.files[0];
        console.log(33, obj.files[0]);
        if(!file) return;

        // 分片上传文件
        cos.sliceUploadFile({
            Bucket: Bucket,
            Region: Region,
            Key: "/uploads/machtobank/" + data + file.name,
            Body: file
        }, function(err, data) {
            console.log(err, data);

            console.log(fid, img);
            $("#" + fid).val("https://file.wunengkeji.com/" + data.Key);
            $("." + img).attr("src", "https://file.wunengkeji.com/" + data.Key);
            $("." + img).next().removeClass("hide");
            $("." + img).next().find(".fdj").attr("data-img", "https://file.wunengkeji.com/" + data.Key);
        });

    };
</script>
<script>
    function setup(set) {
        $('.setup').css('display', 'none');
        $('.setup' + set).css('display', 'block');

    };
    laydate.render({
        elem: '#licSdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function(value, date) {
            console.log(value, date);
            var endtime = $("#licEdate").val();

            //转换时间
            var endtime = new Date(endtime.replace("-", "/").replace("-", "/")).getTime();
            var starttime = new Date(value.replace("-", "/").replace("-", "/")).getTime();
            //比较时间
            console.log(11, endtime, starttime);

            if(endtime <= starttime) {
                layer.alert("开始时间不可以大于结束时间");
                $("#licSdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#licEdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function(value, date, endDate) {
            console.log(value, date);
            var starttime = $("#licSdate").val();

            //转换时间
            var start = new Date(starttime.replace("-", "/").replace("-", "/")).getTime();
            var end = new Date(value.replace("-", "/").replace("-", "/")).getTime();
            //比较时间
            console.log(11, start, end);

            if(end <= start) {
                layer.alert("结束时间不可以小于开始时间");
                $("#licEdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#contactIdSdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function(value, date) {
            console.log(value, date);
            var endtime = $("#contactIdEdate").val();

            //转换时间
            var endtime = new Date(endtime.replace("-", "/").replace("-", "/")).getTime();
            var starttime = new Date(value.replace("-", "/").replace("-", "/")).getTime();
            //比较时间
            console.log(11, endtime, starttime);

            if(endtime <= starttime) {
                layer.alert("开始时间不可以大于结束时间");
                $("#contactIdSdate").val("");
            }
        }
    });
    laydate.render({
        elem: '#contactIdEdate',
        type: 'date',
        format: 'yyyyMMdd',
        change: function(value, date, endDate) {
            console.log(value, date);
            var starttime = $("#contactIdSdate").val();

            //转换时间
            var start = new Date(starttime.replace("-", "/").replace("-", "/")).getTime();
            var end = new Date(value.replace("-", "/").replace("-", "/")).getTime();
            //比较时间
            console.log(11, start, end);

            if(end <= start) {
                layer.alert("结束时间不可以小于开始时间");
                $("#contactIdEdate").val("");
            }
        }
    });
    //     laydate.render({
    //         elem: '#accountIdSdate',
    //         type: 'date',
    //         format:'yyyyMMdd',
    //         change: function(value, date){
    //             console.log(value,date);
    //             var endtime = $("#accountIdEdate").val();
    //
    //             //转换时间
    //             var endtime=new Date(endtime.replace("-", "/").replace("-", "/")).getTime();
    //             var starttime=new Date(value.replace("-", "/").replace("-", "/")).getTime();
    //             //比较时间
    //             console.log(11,endtime,starttime);
    //
    //             if(endtime <= starttime){
    //                 layer.alert("开始时间不可以大于结束时间");
    //                 $("#accountIdSdate").val("");
    //             }
    //         }
    //     });
    //     laydate.render({
    //         elem: '#accountIdEdate',
    //         type: 'date',
    //         format:'yyyyMMdd',
    //         change: function(value, date,endDate){
    //             console.log(value,date);
    //             var starttime = $("#accountIdSdate").val();
    //
    // //转换时间
    //             var start=new Date(starttime.replace("-", "/").replace("-", "/")).getTime();
    //             var end=new Date(value.replace("-", "/").replace("-", "/")).getTime();
    // //比较时间
    //             console.log(11,start,end);
    //
    //             if(end <= start){
    //                 layer.alert("结束时间不可以小于开始时间");
    //                 $("#accountIdEdate").val("");
    //             }
    //         }
    //     });
</script>

<script type="text/javascript">
    $("#distpicker1").distpicker({
        province: "省",
        city: "市",
        district: "区/县",
        autoSelect: false
    });
    $("#distpicker2").distpicker({
        province: "省",
        city: "市",
        district: "区/县",
        autoSelect: false
    });
    $("#distpicker3").distpicker({
        province: "省",
        city: "市",
        district: "区/县",
        autoSelect: false
    });
</script>
<script type="text/javascript">
</script>
<script>
    function addform() {
        //    商户性质
        var merchClass = $("#merchClass").val();
        // 商户类型
        var merchType = $("#merchType").val();
        // 商户种类
        var pnrpayMerType = $("#pnrpayMerType").val();
        // 商户注册名称
        var merchName = $("#merchName").val();
        var relatedMerchName = $("#relatedMerchName").val();
        //商户简称
        var merchShortName = $("#merchShortName").val();
        //商户注册地
        var regProvId = $("#regProvId").val();
        var regCityId = $("#regCityId").val();
        var regAreaId = $("#regAreaId").val();
        var regAddr = $("#regAddr").val();
        //是否三证合一
        var isCreditCode = parseInt($(".isCreditCode").val());
        //统一社会信用代
        var creditCode = $('#creditCode').val();
        //营业执照编号
        var regCode = $("#regCode").val();
        var orgCode = $("#orgCode").val();

        //证照开始日期

        var licType = $('#licType').val();
        var licSdate = $('#licSdate').val();
        var licEdate = $("#licEdate").val();
        //商户经营类型
        var cateType = $('#cateType').val();

        // 法人信息
        var contactName = $("#contactName").val();
        // 法人证件号码
        var contactIdNo = $("#contactIdNo").val();
        //商户简称
        var merchShortName = $("#merchShortName").val();
        //法人证件类型
        var contactIdType = $("#contactIdType").val();
        //法人证件有效期
        var contactIdValidType = $("#contactIdValidType").val();
        var contactIdSdate = $("#contactIdSdate").val();
        var contactIdEdate = $("#contactIdEdate").val();
        //法人手机号
        var contactTelno = $("#contactTelno").val();
        //法人邮箱
        var contactEmail = $('#contactEmail').val();
        //银行账户信息
        //管理员账号
        var tellerId = $("#tellerId").val();
        //是否发短信通知商户
        var isSendMes = $('.isSendMes').val();
        // 结算账户类型
        var isPrivate = $("#isPrivate").val();
        //结算账户名
        var bankActName = $('#bankActName').val();
        // 结算账号
        var bankActId = $("#bankActId").val();
        //结算账户名
        var bankActName = $('#bankActName').val();
        // 银行所在地
        var bankProvId = $("#bankProvId").val();
        var bankCityId = $("#bankCityId").val();
        var bankAreaId = $("#bankAreaId").val();
        var fee01 = $("#fee01").val();

        //银行名称
        var bankName = $('#bankName').val();
        // 上传证件照
        // 营业执照
        var archFlph01 = $("#archFlph01").val();
        //开户许可证
        var archFlph04 = $('#archFlph04').val();
        //法人身份证
        var archFlph05 = $('#archFlph05').val();
        var archFlph06 = $('#archFlph06').val();
        // 开通微信支付
        var auth18 = $('.auth18').val();
        var wechatCateCode = $('#wechatCateCode').val();
        var fee08 = $('#fee08').val();
        // 开通支付宝支付
        var auth19 = $('.auth19').val();
        var alipayCateCode = $('#alipayCateCode').val();
        var fee12 = $('#fee12').val();
        // 开通微信小程序支付
        var auth38 = $('.auth38').val();
        var wxAppid = $('#wxAppid').val();
        var fee33 = $('#fee33').val();

        //是否为数字
        var reg = /^[1-9]\d*$|^0$/;
        var zreg = /^([1-9]\d*|[0]{1,1})$/;
        //是否为小数数字
        var xreg = /^\d+(\.\d+)?$/;
        // 请填写统一社会信用代码证

        //请输入商户性质
        if(merchClass == "") {
            layer.alert("请选择商户性质", {
                icon: 7
            });
            $("#merchClass").focus();
            return false;
        }
        //请输入商户类型
        if(merchType !== "") {
            if(merchType == 1) {
                if(relatedMerchName == "") {
                    layer.alert("请填写关联商户号", {
                        icon: 7
                    });
                    $("#relatedMerchName").focus();
                    return false;
                }

            }

        } else {
            layer.alert("请选择商户类型", {
                icon: 7
            });
            $("#merchType").focus();
            return false;
        }
        //请输入商户种类
        if(pnrpayMerType == "") {
            layer.alert("请选择商户种类", {
                icon: 7
            });
            $("#pnrpayMerType").focus();
            return false;
        }
        //请输入商户注册名称
        if(merchName == "") {
            layer.alert("请输入商户注册名称", {
                icon: 7
            });
            $("#merchName").focus();
            return false;
        }
        //请输入商户简称
        if(merchShortName == "") {
            layer.alert("请输入商户简称", {
                icon: 7
            });
            $("#merchShortName").focus();
            return false;
        }
        //商户注册地
        if(regProvId == "") {
            layer.alert("请选择商户注册地", {
                icon: 7
            });
            $("#regProvId").focus();
            return false;
        }
        if(regCityId == "") {
            layer.alert("请选择商户注册地", {
                icon: 7
            });
            $("#regCityId").focus();
            return false;
        }
        if(regAreaId == "") {
            layer.alert("请选择商户注册地", {
                icon: 7
            });
            $("#regAreaId").focus();
            return false;
        }
        //商户注册详细地址
        if(regAddr == "") {
            layer.alert("请填写商户注册详细地址", {
                icon: 7
            });
            $("#regAddr").focus();
            return false;
        }
        if(merchClass == 1) {
            if(isCreditCode == 1) {
                if(creditCode == "") {
                    layer.alert("请填写统一社会信用代码证", {
                        icon: 7
                    });
                    $("#creditCode").focus();
                    return false;
                }

            } else if(isCreditCode == 0) {
                if(regCode == "") {
                    layer.alert("请填写营业执照编号", {
                        icon: 7
                    });
                    $("#regCode").focus();
                    return false;
                }
                if(orgCode == "") {
                    layer.alert("请填写组织机构代码证", {
                        icon: 7
                    });
                    $("#orgCode").focus();
                    return false;
                }
            }
        }

        if(licType == "") {
            layer.alert("请选择证照有效期", {
                icon: 7
            });
            $("#licType").focus();
            return false;
        }else if(licType ==1 ){

            if(licEdate=""){
                layer.alert("请输入证照结束日期", {
                    icon: 7
                });
                $("#licEdate").focus();
                return false;
            }

        }if(licType ==2 ){
            if(licSdate=""){
                layer.alert("请输入证照开始日期", {
                    icon: 7
                });
                $("#licSdate").focus();
                return false;
            }
        }
        if(licSdate=""){
            layer.alert("请输入证照开始日期", {
                icon: 7
            });
            $("#licSdate").focus();
            return false;
        }
        //法人
        if(contactName == "") {
            layer.alert("请填写法人", {
                icon: 7
            });
            $("#contactName").focus();
            return false;
        }
        if(contactIdType == "") {
            layer.alert("请选择法人证件类型", {
                icon: 7
            });
            $("#contactIdType").focus();
            return false;
        }
        if(contactIdNo == "") {
            layer.alert("请填写法人证件号码", {
                icon: 7
            });
            $("#contactIdNo").focus();
            return false;
        }
        if(contactIdValidType !== "") {
            if(contactIdValidType == 1) {
                if(contactIdEdate == "") {
                    layer.alert("请填写法人证件有效期结束日期", {
                        icon: 7
                    });
                    $("#contactIdEdate").focus();
                    return false;
                }
            }
        } else {
            layer.alert("请选择法人证件有效期", {
                icon: 7
            });
            $("#contactIdValidType").focus();
            return false;
        }
        if(contactIdSdate == "") {
            layer.alert("请填写法人证件有效期开始日期", {
                icon: 7
            });
            $("#contactIdSdate").focus();
            return false;
        }
        if(contactTelno == "") {
            layer.alert("请填写法人手机号", {
                icon: 7
            });
            $("#contactTelno").focus();
            return false;
        }
        if(contactEmail == "") {
            layer.alert("请填写法人邮箱", {
                icon: 7
            });
            $("#contactEmail").focus();
            return false;
        }
        //结算账户类型
        var accountIdNo = $("#accountIdNo").val();
        var accountIdValidType = $("#accountIdValidType").val();
        var accountIdSdate = $("#accountIdSdate").val();
        var accountIdEdate = $("#accountIdEdate").val();
        var accountIdType = $("#accountIdType").val();
          var settleTerm=$("#settleTerm").val();


        if(tellerId == "") {
            layer.alert("请填写管理员账号", {
                icon: 7
            });
            $("#tellerId").focus();
            return false;
        }

        if(isPrivate == 1) {

            // if(accountIdType == ""){
            //     layer.alert("请选择持卡人证件类型",{icon:7});
            //     $("#accountIdType").focus();
            //     return false;
            // }
            // if(accountIdNo == ""){
            //     layer.alert("请填写持卡人证件号码",{icon:7});
            //     $("#accountIdNo").focus();
            //     return false;
            // }
            //
            // if(accountIdValidType==2){
            //     if(accountIdSdate == ""){
            //         layer.alert("请填写持卡人证件有效期开始日期",{icon:7});
            //         $("#accountIdSdate").focus();
            //         return false;
            //     }
            //
            // }else if(accountIdValidType==1){
            //     if(accountIdEdate == ""){
            //         layer.alert("持卡人证件有效期结束日期",{icon:7});
            //         $("#accountIdEdate").focus();
            //         return false;
            //     }
            //     if(accountIdSdate == ""){
            //         layer.alert("请填写持卡人证件有效期开始日期",{icon:7});
            //         $("#accountIdSdate").focus();
            //         return false;
            //     }
            // }

        } else if(isPrivate == "") {

            layer.alert("请选择结算账户类型", {
                icon: 7
            });
            $("#isPrivate").focus();
            return false;

        }
        if(bankActName == "") {
            layer.alert("请填写结算账户名", {
                icon: 7
            });
            $("#bankActName").focus();
            return false;
        }
        if(bankActId == "") {
            layer.alert("请填写结算账号", {
                icon: 7
            });
            $("#bankActId").focus();
            return false;
        }
        if(bankProvId == "") {
            layer.alert("请填写银行所在地", {
                icon: 7
            });
            $("#bankProvId").focus();
            return false;
        }
        if(bankCityId == "") {
            layer.alert("请填写银行所在地", {
                icon: 7
            });
            $("#bankCityId").focus();
            return false;
        }
        if(bankAreaId == "") {
            layer.alert("请填写银行所在地", {
                icon: 7
            });
            $("#bankAreaId").focus();
            return false;
        }
        if(bankName == "") {
            layer.alert("请填写银行名称", {
                icon: 7
            });
            $("#bankName").focus();
            return false;
        }
        // 结算周期
        if(settleTerm == 2) {
            if(fee01 == "") {
                layer.alert("请填写D+1结算手续费", {
                    icon: 7
                });
                $("#fee01").focus();
                return false;
            }

        }

        //营业执照
        if(archFlph01 == "") {
            layer.alert("请上传营业执照", {
                icon: 7
            });

            return false;
        }
        //开户许可证
        if(archFlph04 == "") {
            layer.alert("请上传开户许可证", {
                icon: 7
            });

            return false;
        }
        //法人身份证正面
        if(archFlph05 == "") {
            layer.alert("请上传法人身份证正面", {
                icon: 7
            });
            return false;
        }
        //法人身份证反面
        if(archFlph06 == "") {
            layer.alert("请上传法人身份证反面", {
                icon: 7
            });
            return false;
        }

        // 是否开通微信支付
        if(auth18 == 1) {
            // console.log(1112,auth18);

            if(wechatCateCode == "") {
                layer.alert("请填写商户经营类目", {
                    icon: 7
                });
                return false;
            }
            if(fee08 == "") {
                layer.alert("请填写微信支付手续费", {
                    icon: 7
                });
                return false;
            }
        }
        // 开通支付宝支付
        if(auth19 == 1) {

            if(alipayCateCode == "") {
                layer.alert("请填写商户经营类目", {
                    icon: 7
                });
                return false;
            }
            if(fee12 == "") {
                layer.alert("请填写支付宝支付手续费", {
                    icon: 7
                });
                return false;
            }

        }
        if(auth38 == 1) {

            if(wxAppid == "") {
                layer.alert("请填写微信小程序APPid", {
                    icon: 7
                });
                return false;
            }
            if(fee33 == "") {
                layer.alert("请填写微信小程序手续费", {
                    icon: 7
                });
                return false;
            }

        }
        // if(!(/(^[1-9]\d*$)/.test(max_give_friend_times))){
        //     layer.alert("最大可赠送次数请填写整数！");
        //     return false;
        //
        // }
        //
        // if(parseFloat(price)<0.01||parseFloat(price)>9999){
        //
        //     layer.alert("礼品卡价格最小值为0.01，最大值为9999！");
        //     return false;
        // }

        $.ajax({
            url: "{:url('momach/machtobank')}",
            data: $('#mach').serialize(),
            dataType: "json",
            type: "post",
            success: function(res) {

                console.log(999, res);
                var url = res;
                if(res.result_code == "FAIL") {
                    layer.msg(res.result_msg);
                } else {
                    layer.msg(res.result_msg);
                }
                // window.location.href=res;
            }
        })

    }
</script>
<script>
    (function($, window, document, undefined) {
        $.fn.showCity = function(opt) {
            this.defaults = {
                'cityjson': cityjson, //json字符串变量名
                'defaultShow': false, //市、县是否显示,默认不显示
                'showCounty': true, //是否显示县
                'defaultCity': [0, 0, 0] //默认城市，对应id
            };
            this.options = $.extend({}, this.defaults, opt);

            var oCityJson = eval(this.options.cityjson),

                oProvince = $('.province', this),
                oCity = $('.city', this),
                oCounty = $('.county', this),
                provinces = oCityJson.province,
                citys = oCityJson.city,
                countys = oCityJson.county;

            //创建省
            this.creatProvince = function() {
                var html = '';
                for(var i = 0; i < provinces.length; i++) {
                    html += '<option value=' + provinces[i].id + '>' + provinces[i].name + '</option>';
                }
                oProvince.append(html);
            };

            this.creat = function() {
                oProvince.html('<option value="0">请选择</option>');
                this.creatProvince();
                if(this.options.defaultShow) {
                    oCity.show();
                    oCounty.show();
                    oCity.html('<option value="0">请选择</option>');
                    oCounty.html('<option value="0">请选择</option>');
                };
                this.defaultCity();
                this.checkProvince();
                console.log(999, this.options.showCounty);
                if(this.options.showCounty) {
                    this.checkCounty();
                }
            };

            //默认城市
            this.defaultCity = function() {
                if(this.options.defaultCity.toString() == '0,0,0') {
                    return;
                };

                var optionsCity = '';
                for(var i = 0; i < provinces.length; i++) {
                    if(provinces[i].id == this.options.defaultCity[0]) {
                        oProvince.val(provinces[i].id);
                        for(var j = 0; j < citys.length; j++) {
                            if(citys[j].cid == provinces[i].id) {
                                optionsCity += '<option value=' + citys[j].id + '>' + citys[j].name + '</option>'
                            }
                        }
                        oCity.append(optionsCity).show();
                    }
                };

                var optionscounty = '';
                for(var i = 0; i < citys.length; i++) {
                    if(citys[i].id == this.options.defaultCity[1] && citys[i].cid == oProvince.val()) {
                        oCity.val(citys[i].id);
                        if(this.options.showCounty) {
                            for(var j = 0; j < countys.length; j++) {
                                if(countys[j].cid == citys[i].id) {
                                    optionscounty += '<option value=' + countys[j].id + '>' + countys[j].name + '</option>';
                                }
                            }
                            oCounty.append(optionscounty).show();
                        }
                    }
                };

                if(this.options.showCounty) {
                    for(var i = 0; i < countys.length; i++) {
                        if(countys[i].id == this.options.defaultCity[2] && countys[i].cid == oCity.val()) {
                            oCounty.val(countys[i].id);
                        }
                    };
                }
            }

            this.checkProvince = function() {
                oProvince.bind('change', function() {
                    var html = '<option value="0">请选择</option>';
                    var val = $(this).val();
                    console.log(22, val, citys);
                    for(var i = 0; i < citys.length; i++) {
                        if(citys[i].cid == val) {
                            html += '<option value=' + citys[i].id + '>' + citys[i].name + '</option>'
                        }
                    }
                    oCity.html(html).show();
                    oCounty.html('<option value="0">请选择</option>');
                })
            };

            this.checkCounty = function() {
                oCity.bind('change', function() {
                    var html = '<option value="0">请选择</option>';

                    var val = $(this).val();
                    console.log(11, val, countys);
                    for(var i = 0; i < countys.length; i++) {
                        if(countys[i].cid == val) {
                            html += '<option value=' + countys[i].id + '>' + countys[i].name + '</option>'
                        }
                    }
                    oCounty.html(html).show();
                })
            };

            return this.creat();
        }
    }(jQuery, window, document))

    $(function() {
        $('#selectItem').showCity({
            "defaultCity": [0, 0, 0]
        });
    });

    function wechat(obj) {
        var vas = $(obj).val();
        $("#wechatCateCode").val(vas);
    }
</script>
<script>
</script>
<script>
    //删除图片
    $(document).on("click", '.delSingle', function() {
        var index = $(this).index(".delSingle");
        console.log(33, index);
        //删除图片上传框的值 解决重复上传问题
        $(".upload").eq(index).val('');
        $(".delSingle").eq(index).parents(".uploadImg").find('img.showImg').attr('src', 'https://file.wunengkeji.com/static/img/500kb.jpg').next().addClass('hide');
        $(".delSingle").eq(index).parents(".uploadImg").find('input.inputimg').val("");
        console.log($(".delSingle").eq(index));
    });
    //放大图片
    $(document).on("click", '.fdj', function() {
        var img = $(this).attr("data-img");
        $("#img").attr("src", img);
        $('#myModal').modal('show')

    });
</script>

</html>